import os


path = r'C:\Users\shenb\Downloads\CommOperator'
exeFiles = [os.path.join(path, f) for f in os.listdir(path) if f.endswith('.exe')]

for f in exeFiles:
    config = f + ".config"
    with open(config, "w") as file:
        print('create:', config)
        file.write('<configuration>\n<startup>\n<supportedRuntime version="v4.0"/>\n</startup>\n</configuration>')
